const mongoose = require('mongoose');
var mongoosePaginate = require('mongoose-paginate');//分页

var schema = new mongoose.Schema({
    title:String,
    author:String,
    date:{type:Date,default:Date.now},
    comments:Number,
    cateId: mongoose.Schema.ObjectId,
    userId: mongoose.Schema.ObjectId,
    desc:String
})

schema.plugin(mongoosePaginate);
module.exports =  mongoose.model('New',schema,'new');